import Cookies from 'js-cookie'

const TokenKey = 'iHRM_token'

const StartToken = 'Start_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export const getStartToken = () => {
  return Cookies.get(StartToken)
}

export const setStartToken = () => {
  return Cookies.set(StartToken, Date.now())
}

export const removeStartToken = () => {
  return Cookies.remove(StartToken)
}
